package com.kcnet.qk;

import android.app.Application;


import com.kcnet.qk.app.AppContext;
import com.kcnet.qk.constant.Const;
import com.kcnet.qk.util.AbnormalHandler;
import com.kcnet.qk.util.CrashHandler;
import com.kcnet.qk.util.FileUtils;

import net.tsz.afinal.FinalHttp;

/**
 * Created by czc on 2017/6/18.
 */

public class MyApplication extends Application {

    /**
     * SDK初始化也可以放到Application中
     */
    public static String APPID = "a28a536d06cc4c9c4ad4fa3fa14c9907";
    private static Application application;
    public static FinalHttp http;
    @Override
    public void onCreate() {
        super.onCreate();
        application = this;
        http = new FinalHttp();
        FileUtils.initFileManage(this);
       // http.configTimeout(300000);
        if (Const.DEBUG){
            AbnormalHandler.getInstance().init(this);
        }
        CrashHandler.getInstance().init(this);
        AppContext.init(this);
    }

    public static  Application getApplication(){
        return application;
    }
}
